<!DOCTYPE html>  
<html>
<meta charset="utf-8" />  
<title>全屏</title>  
<style>
    *{
        margin: 0;
        padding: 0;
    }
    .box{
        width: 100px;
        height: 100px;
        background: red;
    }
    .child{
        width: 100%;
        height: 100%;
        position: absolute;
        background: yellow;
    }
</style>
<body>
    <div class='box'>
        <div class="child"></div>
    </div>
</body>
</html>